from django.urls import path
from hello.views import hello_world, article_list, search, render_str, render_html, http_request, http_response, no_data_404, article_detail
from hello.views import index, HomeView
urlpatterns = [
    path('world/', hello_world),
    path('article/<int:month>/', article_list,
         name='article_list'),  # 视图函数名称与规则名称要统一
    path('search/', search, name='search'),
    path('render/str', render_str, name='render_str'),
    path('render/html', render_html, name='render_html'),
    path('http/req', http_request, name='http_request'),
    path('http/resp', http_response, name='http_response'),
    path('404', no_data_404, name='no_data_404'),
    path('article/<int:art_id>', article_detail, name='article_detail'),
    path('index', index, name='index'),
    path('home', HomeView.as_view(), name='home'),
]
